package com.plian.system.enumeratea;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 车辆状态枚举
 *
 *  @author gangan
 */
@Getter
@AllArgsConstructor
public enum CarInfoStatus {


	/**
	 * 暂存
	 */
	STASH(-1, "暂存"),
	/**
	 * 未上报
	 */
	UNREVIEWED(0, "未上报"),

	/**
	 * 审核中
	 */
	AUDIT(1, "审核中"),

	/**
	 * 在用
	 */
	USING(2, "在用"),

	/**
	 * 处置中
	 */
	IN_DISPOSAL(3, "处置中"),

	/**
	 * 已处置
	 */
	DISPOSAL(4, "已处置"),

	/**
	 * 拟处置
	 */
	PROPOSED_DISPOSAL(5, "拟处置"),

	/**
	 * 划转中
	 */
	IN_TRANSFER(6, "划转中"),
	/**
	 * 已划转
	 */
	TRANSFER(7, "已划转");

	final int status;

	final String statusName;

	public static String getStatusNameByStatus(int status) {
		CarInfoStatus[] carInfoStatusList = values();
		for (CarInfoStatus carInfoStatus : carInfoStatusList) {
			if (carInfoStatus.status == status) {
				return carInfoStatus.statusName;
			}
		}
		return null;
	}

}
